package com.p2p.backend.util;

import java.util.HashMap;
import java.util.Map;

import com.github.pagehelper.PageInfo;
import com.p2p.base.page.PageVo;

/**
 * leiwen@yiqihao.com
 */
public class PageUtils {

	public static Map<String,Object> data(PageInfo page) {
		Map<String, Object> data = new HashMap<String, Object>();
		data.put("rows", page.getList());
		data.put("total", page.getTotal());
		return data;
	}
	
	public static Map<String,Object> data(PageVo page) {
		Map<String, Object> data = new HashMap<String, Object>();
		data.put("rows", page.getList());
		data.put("total", page.getTotalCount());
		return data;
	}

}
